//本地缓存
const PREFIX = 'ginessential_';

//user
const USER_PREFIX = `${PREFIX}user_`;
const USER_TOKEN = `${USER_PREFIX}token_`;
const USER_INFO = `${USER_PREFIX}info_`;
const ADMIN_TOKEN = `${USER_PREFIX}admin_token_`;
const VUEX_ALONG = `vuex-along`;


//缓存
const set = (key,data) => {
    localStorage.setItem(key,data);
};
//读取
const get = (key) => localStorage.getItem(key);

export default {
    set,
    get,
    USER_TOKEN,
    USER_INFO,
    ADMIN_TOKEN,
    VUEX_ALONG,
}